package injection;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class HelloWorld {

	public static void main(String[] args) {
		//1. ???? Spring ?? IOC ????
		ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
		
		//2. ?? IOC ????????? bean ?????
		Person person = (Person) ctx.getBean("hello");
		// ????????????????? xml ???????????????? Person ????? Bean
		person = ctx.getBean(Person.class);
		
		//3. ??? bean
		person.say();
	}
}
